package com.th.supcom.pds.phamapply.client.widget.inpharmacyreturn;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.th.supcom.pds.common.client.commom.FieldPanel;

/**
 * 退药信息面板
 * 
 * @author yzhang
 */
public class InPharmacyReturnQueryPanel extends FieldSet
{
    /** 门诊退药文本域集合. */
    private final InPharmacyReturnFields m_inPharmacyReturnFields;
    /** 门诊退药按钮集合. */
    private final InPharmacyReturnButtons m_inPharmacyReturnButtons;

    /**
     * 构造方法
     * 
     * @param drugReturnAndRefundFields
     * @param drugReturnButtons
     */
    public InPharmacyReturnQueryPanel (InPharmacyReturnFields inPharmacyReturnFields,
                                       InPharmacyReturnButtons inPharmacyReturnButtons)
    {
        m_inPharmacyReturnFields = inPharmacyReturnFields;
        m_inPharmacyReturnButtons = inPharmacyReturnButtons;
        initUI ();
    }

    /**
     * 初始化界面
     */
    private void initUI ()
    {
        setHeading ("退药查询");
        setLayout (new FitLayout ());
        FieldPanel pp = new FieldPanel ();
        pp.setLabelAlian ("L");

        pp.addCol (m_inPharmacyReturnFields.getPrescNoField (), 4, null, 65);
        pp.addCol (m_inPharmacyReturnFields.getPatiIdField (), 4, null, 65);
        pp.addCol (m_inPharmacyReturnButtons.getQueryBtn (), 2, null, null);
        pp.addCol (m_inPharmacyReturnButtons.getConfirmBtn (), 2, null, null);
        pp.addCol (m_inPharmacyReturnButtons.getClearBtn (), 2, null, null);
        pp.addCol (new LayoutContainer (), 4, null, null);

        pp.newRow ();

        add (pp);
    }
}
